package com.tyk.bookstore.front.member.model.query;

import com.tyk.bookstore.front.member.constant.MemberValidConstant;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;

@Data
public class DeliveryAddressAddQuery {

    @NotBlank
    @Size(min = 1, max = 8)
    @Schema(description = "名称")
    private String name;

    @NotBlank
    @Size(min = 1, max = MemberValidConstant.CONSIGNEE_NAME_MAX_LENGTH)
    @Schema(description = "收件人姓名")
    private String consignee;

    @NotNull
    @Schema(description = "所在地区code")
    @Min(1)
    private Long areaCode;

    @NotBlank
    @Size(min = 1, max = 48)
    @Schema(description = "详细地址")
    private String address;

    @Pattern(regexp = "(13|14|15|18|17)[0-9]{9}")
    @NotBlank
    @Schema(description = "手机号")
    @Size(min = 11, max = 11)
    private String phone;

}
